﻿@using QDT.Common
@using QDT.Core
@using QDT.Core.Projects
@model QDT.Core.Projects.Project

@{
    Func<ProjectStatus, string> StatusChange = x =>
    {
        switch (x)
        {
            case ProjectStatus.Wait:
                return "进行中";
            case ProjectStatus.Full:
                return "还款中";
            default:
                return "Error";
        }
    };
}
<div class="main">
    <div class="main_title">@Model.Name--的状态更改--下一状态：@StatusChange(Model.Status)</div>
    <div class="blank5"></div>
    <form name="edit" action="@Url.Action("PostChange")" method="post" enctype="multipart/form-data">
        <table class="form">
            <tbody>
                <tr>
                    <td colspan="2" class="topTd"></td>
                </tr>
                <tr>
                    <td class="item_title">项目名称</td>
                    <td class="item_input">@Model.Name</td>
                </tr>
                <tr>
                    <td class="item_title">借款资金</td>
                    <td class="item_input">@Model.BorrowAmount.ToMoney()</td>
                </tr>
                <tr>
                    <td class="item_title">创建时间</td>
                    <td class="item_input">@Model.CreateTime</td>
                </tr>
                <tr>
                    <td class="item_title">贷款类型</td>
                    <td class="item_input">@Html.F().GetPrjectTypeName(Model.TypeID)</td>
                </tr>
                <tr>
                    <td class="item_title">期限</td>
                    <td class="item_input">@Model.RepayTime<span>个月</span></td>
                </tr>
                <tr>
                    <td class="item_title">借款人</td>
                    <td class="item_input">@Html.F().GetUserName(Model.UserID)</td>
                </tr>
                <tr>
                    <td class="item_title">开始时间：</td>
                    <td class="item_input">
                        <input @(Model.Status == ProjectStatus.Wait ? "" : "disabled") type="text" class="textbox" name="StartTime" id="StartTime" value="@Model.StartTime" onfocus="this.blur();$(this).calendar();" />
                    </td>
                </tr>
                <tr>
                    <td class="item_title">开始计息日：</td>
                    <td class="item_input">
                        <input @(Model.Status == ProjectStatus.Full ? "" : "disabled") type="text" class="textbox" name="RepayTime" id="RepayTime" value="@Model.RepayStartTime" onfocus="this.blur();$(this).calendar();" />
                    </td>
                </tr>
                <tr>
                    <td class="item_title">&nbsp;</td>
                    <td class="item_input">
                        <!--隐藏元素-->
                        <input type="hidden" name="id" value="@Model.ID" />
                        <input type="hidden" name="status" value="@Model.Status" />
                        <input type="submit" class="button" value="确认" />
                        <input type="reset" class="button" value="重置" />
                    </td>
                </tr>	
                <tr>
                    <td colspan="2" class="bottomTd"></td>
                </tr>
            </tbody>
        </table>	 
    </form>
</div>